package com.jeff.android.lab.jetpack.fragment

import android.content.Context
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import com.jeff.android.lab.Constant
import com.jeff.android.lab.R
import com.jeff.utils.LogUtil

/**
 * @author: dingfeng
 * @date: 2021/3/3
 * @since: 1.0.0
 **/
class FragmentD: LazyFragmentX() {

    override fun getRootLayout(): Int {
        return R.layout.test_fragment1
    }

    override fun onAttach(context: Context) {
        super.onAttach(context)
        LogUtil.d(Constant.TAG, "FragmentD onAttach")
    }

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        LogUtil.d(Constant.TAG, "FragmentD onCreate")
    }

    override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
        LogUtil.d(Constant.TAG, "FragmentD onCreateView")
        return super.onCreateView(inflater, container, savedInstanceState)
    }

    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
        LogUtil.d(Constant.TAG, "FragmentD onViewCreated")
        super.onViewCreated(view, savedInstanceState)
    }

    override fun onStart() {
        LogUtil.d(Constant.TAG, "FragmentD onStart")
        super.onStart()
    }

    override fun onResume() {
        LogUtil.d(Constant.TAG, "FragmentD onResume")
        super.onResume()
    }

    override fun onPause() {
        LogUtil.d(Constant.TAG, "FragmentD onPause")
        super.onPause()
    }

    override fun onDestroyView() {
        LogUtil.d(Constant.TAG, "FragmentD onDestroyView")
        super.onDestroyView()
    }

    override fun onDestroy() {
        LogUtil.d(Constant.TAG, "FragmentD onDestroy")
        super.onDestroy()
    }

    override fun onDetach() {
        LogUtil.d(Constant.TAG, "FragmentD onDetach")
        super.onDetach()
    }

    override fun onFragmentVisibleChange(visible: Boolean) {
        super.onFragmentVisibleChange(visible)
        LogUtil.d(Constant.TAG, "FragmentD onFragmentVisibleChange visible = $visible")
    }

    override fun onLazyLoad() {
        super.onLazyLoad()
        LogUtil.d(Constant.TAG, "FragmentD onLazyLoad ...... ")
    }

}